package thirdlyHomework;

public class method1 {
    String name;
    int year;

    public int getYear() {
        return year;
    }

    public void setYear(int year) {
        this.year = year;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public  void Woker(String name,int year){
        System.out.println("该工人对象的属性信息如下：");
        System.out.println("请录入工人姓名："+name);
        System.out.println("请录入工人工龄："+year);


    }
}
